package Draw0513;

public class Slider {
    int x1,x2,y1,y2;

    public Slider(int x1, int x2, int y1, int y2) {
        this.x1 = x1;
        this.x2 = x2;
        this.y1 = y1;
        this.y2 = y2;
    }







    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Slider slider)) return false;
        return (x1 == slider.x1 && y1 == slider.y1 && x2 == slider.x2 && y2 == slider.y2) ||
                (x1 == slider.x2 && y1 == slider.y2 && x2 == slider.x1 && y2 == slider.y1);
    }

    @Override
    public int hashCode() {
        int hash = x1 + x2 + y1 + y2;
        return hash;
    }
}
